#include <stdio.h>

int trimin(int a, int b, int c)
{
    int min = (a < b ? a : b);
    return (min < c ? min : c);
}

int main(int argc, char const *argv[])
{
    int p, m, c, k, r, v;
    scanf("%d%d%d%d%d%d", &p, &m, &c, &k, &r, &v);
    printf("%d\n", trimin(p / k, m / r, c / v));
    return 0;
}
